home *** CD-ROM | disk | FTP | other *** search
/ Chip 2005 March / CMCD0305.ISO / Software / Shareware / Grafica / falbum / fasetup101.exe / {app} / Templates / card.tml next >
Text File  |  2004-09-19  |  5KB  |  156 lines

  1. <head>
  2. <title>Web-gallery for [[FolderName]]</title>
  3. <script>
  4. var old_img= new Image();
  5. var pagecount=Math.floor([[ImagesCount]]/[[ImagesPerPage]]);
  6. var curpagefile='';
  7. if ( ([[ImagesCount]]/[[ImagesPerPage]])>pagecount ) { pagecount++; }
  8.  
  9. var startborder=([[PageNumber]]-1)*[[ImagesPerPage]]+1;
  10. var endborder=[[PageNumber]]*[[ImagesPerPage]];
  11.         
  12.         
  13. function sel_image(img,fn,wd,ht)
  14. {
  15. old_img.border=0;
  16. img.border=3;
  17. old_img=img;
  18. var im = new Image();
  19. im.src=img;
  20. var s='';
  21. s='width='+wd+',height='+ht+',resizable=yes,titlebar=no,fullscreen=no';
  22. k=fn;
  23. while (k.indexOf('.',0)>=0)
  24. {
  25. k=k.replace('.','_');
  26. }
  27. while (k.indexOf(' ',0)>=0)
  28. {
  29. k=k.replace(' ','_');
  30. }
  31. while (k.indexOf('-',0)>=0)
  32. {
  33. k=k.replace('-','_');
  34. }
  35. popup=window.open('',k,s);
  36. popup.innerHeight=0;
  37. popup.document.open();
  38. popup.document.write('<head><title>'+fn+'</title></head><body leftmargin=0 topmargin=0 bgcolor=silver><table height=100% width=100%><tr valign=center><td>');
  39. popup.document.write('<center><img alt="Click to close window" style="cursor: hand" src='+im.src+' onClick="javascript:window.close()">');
  40. popup.document.write('</td></tr></table></body>');
  41. popup.focus();
  42. }
  43.  
  44. function DrawTabs()
  45. {
  46. if (pagecount>1) {
  47.           for (i=0;i<pagecount;i++)
  48.             { curpagefile='[[PageFileName]]';
  49.        
  50.               if (i>0) {curpagefile=curpagefile.replace('.',''+i+'.');}
  51.              
  52.               startborder=i*[[ImagesPerPage]]+1;
  53.               endborder=(i+1)*[[ImagesPerPage]];
  54.           
  55.               if (endborder>[[ImagesCount]]) {endborder=[[ImagesCount]];}
  56.           
  57.               if ((i+1)==[[PageNumber]])
  58.                 {document.writeln('<font color=black>['+startborder+'-'+endborder+']</font>' );}
  59.               else
  60.                 {document.writeln('<a href='+curpagefile+'><font color=silver>['+startborder+'-'+endborder+']</font></a>');}
  61.             }
  62.         }
  63. }
  64.  
  65. </script>
  66. </head>
  67. <body>
  68. <center>
  69. <table cellspacing=1 width=680>
  70. <tr colspan=5><td colspan=5>
  71. <table bgcolor=EDEDED width=100% height=100%>
  72.   <tr align=center><td width=100%><font face='Tahoma' color=black size=2><b>[[FolderName]]</b></font>
  73.   <font face='Tahoma' color=gray size=2>[
  74.    <script>
  75.      
  76.      document.writeln('[[ImagesCount]] images');
  77.    </script>
  78.    ]</font></td></tr>
  79. </table>
  80. </td></tr>
  81.  
  82. <tr><td colspan=2>
  83. <table bgcolor=EDEDED width=100% height=100%>
  84.   <tr align=center><td width=100%>
  85.     <font face='Tahoma' color=silver size=2><a><font color=silver></font></a>
  86.       <script>
  87.          DrawTabs();   
  88.       </script>
  89.     </font>
  90.   </td></tr>
  91. </table></td></tr>
  92.  
  93. [[RecordInfo]]
  94. <tr align=center height=103>[[01]]
  95. <td>
  96. <table bgcolor=EDEDED width=100% height=100% cellpadding=5>
  97. <tr align=center>
  98. <td width=110 >
  99.  <img style="cursor: hand" border=0 src="[[IconFilePath]]" name="[[SampleFilePath]]" onClick="sel_image(this.name,'[[FileName]]',[[SampleWidth]],[[SampleHeight]])">
  100. </td>
  101. <td valign=top align=left width=200 bgcolor=FDFDFD>
  102. <font face=Tahoma size=2><b>
  103. <script>
  104. if ('[[Subject]]'=='')
  105. {document.writeln('<font color=silver>No subject</font>');}
  106. else {document.writeln('[[Subject]]');}
  107. </script>
  108. </b></font><br>
  109. <font face=Tahoma color=gray size=1>[[DateTime]]</font><br><br>
  110. <font face=Tahoma size=2>[[Comment]]</font>
  111. </td>
  112. </tr>
  113. </table>
  114. </td>
  115. [[/01]][[02]]
  116. <td>
  117. <table bgcolor=EDEDED width=100% height=100% cellpadding=5>
  118. <tr align=center>
  119. <td width=110 >
  120.  <img style="cursor: hand" border=0 src="[[IconFilePath]]" name="[[SampleFilePath]]" onClick="sel_image(this.name,'[[FileName]]',[[SampleWidth]],[[SampleHeight]])">
  121. </td>
  122. <td valign=top align=left width=200 bgcolor=FDFDFD>
  123. <font face=Tahoma size=2><b>
  124. <script>
  125. if ('[[Subject]]'=='')
  126. {document.writeln('<font color=silver>No subject</font>');}
  127. else {document.writeln('[[Subject]]');}
  128. </script>
  129. </b></font><br>
  130. <font face=Tahoma color=gray size=1>[[DateTime]]</font><br><br>
  131. <font face=Tahoma size=2>[[Comment]]</font>
  132. </td>
  133. </tr>
  134. </table>
  135. </td>
  136. [[/02]]</tr>
  137. [[/RecordInfo]]
  138.  
  139. <tr><td colspan=2>
  140. <table bgcolor=EDEDED width=100% height=100%>
  141.   <tr align=center><td width=100%>
  142.     <font face='Tahoma' color=silver size=2><a><font color=silver></font></a>
  143.       <script>
  144.          DrawTabs();   
  145.       </script>
  146.     </font>
  147.   </td></tr>
  148. </table></td></tr>
  149.  
  150. <tr><td colspan=2>
  151. <table  width=100% height=100%>
  152.   <tr align=center><td width=100%><font face='Tahoma' color=silver size=1>This gallery generated by <a href='http://www.enins.com/f-album'><font color=silver>F-Album</font></a></font>
  153.   </td></tr>
  154. </table></td></tr>
  155. </table>
  156. </body>